package com.github.maojian.base;


/**
 * 重复调用start会发生什么
 *
 * 抛出 IllegalThreadStateException 的异常
 */
public class RepeatStart {

    public static void main(String[] args) {
        Runnable r = ()-> System.out.println("hi");
        Thread thread = new Thread(r,"task1");
        thread.start();
        thread.start();
    }
}
